package com.crm.result;

import lombok.Getter;

/**
 * @author wb
 * @since 2024-05-28
 */

@Getter
public enum ResultEnum {

    // 成功失败
    SUCCESS(200, "操作成功"),
    FAILURE(500, "操作失败"),

    // 权限不足
    NOT_PERMISSION(401, "权限不足，请联系管理员！"),

    // 登录相关
    USERNAME_OR_PASSWORD_NULL(201, "用户名或密码不能为空"),
    CODE_NULL(201, "验证码不能为空"),
    USERNAME_NOT_EXIST(201, "用户名不存在"),
    PASSWORD_ERROR(201, "密码错误"),
    CODE_ERROR(201,"验证码错误"),
    OLD_PASSWORD_ERROR(201, "旧密码错误"),
    ;

    private final Integer code;
    private final String message;

    ResultEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }
}
